94af264
@@ -649,6 +649,11 @@
public static void checkDeletePermission(Path path, Configuration conf, String u
     //   if a user is a super user. Also super users running hive queries is not a common
     //   use case. super users can also do a chown to be able to drop the file
 
+    if(path == null) {
+      // no file/dir to be deleted
+      return;
+    }
+
     final FileSystem fs = path.getFileSystem(conf);
     if (!fs.exists(path)) {
       // no file/dir to be deleted
